package com.study.ming.websocket;

import com.study.ming.entity.WeatherPojo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yh
 * @date 2022/10/12 11:32
 **/
@RestController
public class WeatherController {

    @GetMapping("/getByCity")
    public WeatherPojo getWeatherByCity(@RequestParam(name="id", value = "id", required = false, defaultValue = "1") Integer id){
        int a = 1/0;
        return new WeatherPojo(id, "晴天", "微风", "23");
    }
}
